package org.common.entity;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import lombok.Setter;
import lombok.Getter;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
@Document(collection = "users")
@Setter
@Getter
public class UserEntity {


    @Id
    private String id;

    @Pattern(regexp = "^[a-zA-Z0-9_]{1,16}$")
    private String username;


    @NotNull(message = "password must not be null")
    private String password;
}
